package com.wyk.Spring;

/**
 * @ClassName: BeanDefinition
 * @Description: bean对象定义类
 * @Author: 初久
 * @Date: 2022/6/29 10:23
 **/
public class BeanDefinition {
    private Class<?> clazz;  //原生Bean的全类名
    private boolean lazyInit = false; //是否为懒加载
    private String factoryBeanName;  //保存的beanName，在IoC容器中存储的key
    private String Scope = "singleton";

    public BeanDefinition() {
    }

    public BeanDefinition(Class<?> clazz, String factoryBeanName) {
        this.clazz = clazz;
        this.factoryBeanName = factoryBeanName;
    }

    public BeanDefinition(Class<?> clazz, String factoryBeanName, String scope) {
        this.clazz = clazz;
        this.factoryBeanName = factoryBeanName;
        Scope = scope;
    }

    public BeanDefinition(Class<?> clazz, String factoryBeanName, boolean lazyInit) {
        this.clazz = clazz;
        this.lazyInit = lazyInit;
        this.factoryBeanName = factoryBeanName;
    }

    public Class<?> getclazz() {
        return clazz;
    }

    public void setclazz(Class<?> clazz) {
        this.clazz = clazz;
    }

    public boolean isLazyInit() {
        return lazyInit;
    }

    public void setLazyInit(boolean lazyInit) {
        this.lazyInit = lazyInit;
    }

    public String getFactoryBeanName() {
        return factoryBeanName;
    }

    public void setFactoryBeanName(String factoryBeanName) {
        this.factoryBeanName = factoryBeanName;
    }

    public String getScope() {
        return Scope;
    }

    public void setScope(String scope) {
        Scope = scope;
    }
}
